<template>
  <div id="personalcenter">
    <el-container>
      <el-aside width="200px">
        <!-- <el-menu
          default-active="2"
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
          background-color="#f6f9fe"
          text-color="#506480"
          active-text-color="#488cee"
          :default-openeds="openeds"
          :router="true"
        >
          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>考勤管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="/home/atten/approval">
                考勤审批
              </el-menu-item>
              <el-menu-item index="/home/atten/query"> 考勤查询 </el-menu-item>
              <el-menu-item index="/home/atten/analysis">
                考勤分析
              </el-menu-item>
              <el-menu-item index="/home/atten/set"> 考勤设置 </el-menu-item>
            </el-menu-item-group>
          </el-submenu>
        </el-menu> -->
        <el-col :span="24">
          <el-menu
            default-active="2"
            class="el-menu-vertical-demo"
            @open="handleOpen"
            @close="handleClose"
            background-color="#f6f9fe"
            text-color="#506480"
            active-text-color="#488cee"
            :router="true"
          >
            <el-menu-item index="/home/atten/approval">
              <i class="el-icon-menu"></i>
              <span slot="title">考勤审批</span>
            </el-menu-item>
            <el-menu-item index="/home/atten/query">
              <i class="el-icon-menu"></i>
              <span slot="title">考勤查询</span>
            </el-menu-item>
            <el-menu-item index="/home/atten/analysis">
              <i class="el-icon-menu"></i>
              <span slot="title">考勤分析</span>
            </el-menu-item>
            <el-menu-item index="/home/atten/set">
              <i class="el-icon-menu"></i>
              <span slot="title">考勤设置</span>
            </el-menu-item>

          </el-menu>
        </el-col>
      </el-aside>
      <el-main id="nr">
        <router-view />
      </el-main>
    </el-container>
  </div>
</template>
<script>
export default {
  data: function () {
    return {
      openeds: ["1"],
    };
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>
<style scoped lang="less">
.el-submenu .el-menu-item {
  min-width: 0px;
}
.el-menu-item:hover {
  background-color: #e4eefc !important;
}
.el-container,
.el-aside,
.el-main,
.el-menu {
  height: 100%;
}
#personalcenter {
  height: 91.7%;
}
#nr {
  background-color: rgb(242, 242, 242);
}
.el-col{
  height: 100%;
}
</style>
